package com.cn.privider.controller;


import com.alibaba.nacos.api.config.annotation.NacosValue;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/getconfig")
@Slf4j
@RefreshScope
public class ConfigController {
    @Value("${myf:0}")
    private String mfy;
    //回显服务
    @RequestMapping(value = "/{string}", method = RequestMethod.GET)
    public String getconfig(@PathVariable String string) {
        log.info("-------------------" + string);
        log.info("-------------------mfy=" + mfy);
        return "echo--00099: " + mfy;
    }

}
